﻿using System.Collections.Generic;
using System.Data;
using CRMSystemV2.Model;
namespace CRMSystemV2.IDAL
{
    public interface IUser:IBase<User>
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        string Login(string username, string password);
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="username"></param>
        /// <param name="oldpassword"></param>
        /// <param name="newpassword"></param>
        /// <returns></returns>
        string ChangePassword(string username,string oldpassword,string newpassword);
        /// <summary>
        /// 重置密码,默认密码123456，以后可考虑加密
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        string ResetPassword(string id, string password);
        
        /// <summary>
        /// 获取导出数据表
        /// </summary>
        /// <param name="topCount"></param>
        /// <param name="orderField"></param>
        /// <param name="orderDirection"></param>
        /// <returns></returns>
        DataTable GetExportTable(int topCount, Dictionary<string, string> keyWords, string orderField, string orderDirection);
    }
}
